//
//  UILabel+Extension.swift
//  weibo
//
//  Created by 王旭 on 16/4/16.
//  Copyright © 2016年 王旭. All rights reserved.
//

import UIKit

extension UILabel {
    
    //便利构造方法
    convenience init(textColor:UIColor, fontSize:CGFloat, preferredMaxLayoutWidth:CGFloat = 0){
        self.init()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(fontSize)
        
        if preferredMaxLayoutWidth > 0 {
            self.numberOfLines = 0
            self.preferredMaxLayoutWidth = preferredMaxLayoutWidth
        }
    }
    
}
